package com.cl.unipay4j.wx.pay;

import com.cl.unipay4j.core.IBaseEnum;
import com.cl.unipay4j.core.TradeStateEnum;

/**
 * @ClassName WxTradeTypeEnum
 * @Description 交易状态
 * @Author Small
 * @Date 2019/11/29 15:53
 * @Version 1.0
 **/
public enum WxTradeStateEnum implements IBaseEnum<String> {
    SUCCESS("SUCCESS", "支付成功", TradeStateEnum.SUCCESS),
    REFUND("REFUND", "转入退款", TradeStateEnum.CLOSED),
    NOTPAY("NOTPAY", "未支付", TradeStateEnum.WAIT_PAY),
    CLOSED("CLOSED", "已关闭", TradeStateEnum.CLOSED),
    REVOKED("REVOKED", "已撤销（付款码支付）", TradeStateEnum.REVOKED),
    USERPAYING("USERPAYING", "用户支付中（付款码支付）", TradeStateEnum.USERPAYING),
    PAYERROR("PAYERROR", "支付失败(其他原因，如银行返回失败)", TradeStateEnum.FAIL),
    ;
    private String value;
    private String desp;
    private TradeStateEnum tradeState;

    WxTradeStateEnum(String value, String desp, TradeStateEnum tradeState) {
        this.value = value;
        this.desp = desp;
        this.tradeState = tradeState;
    }

    @Override
    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    @Override
    public String getDesp() {
        return desp;
    }

    public void setDesp(String desp) {
        this.desp = desp;
    }

    public TradeStateEnum getTradeState() {
        return tradeState;
    }

    public void setTradeState(TradeStateEnum tradeState) {
        this.tradeState = tradeState;
    }
}
